package com.hngy.educationaladministration.service.serviceImpl;

import com.hngy.educationaladministration.entity.FileTable;
import com.hngy.educationaladministration.mapper.FileTableMapper;
import com.hngy.educationaladministration.service.FileTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: Deng JunHao
 * @Date: 2021-05-04
 * @Description:
 */
@Service
public class FileTableServicelmpl implements FileTableService {
    @Autowired
    private FileTableMapper fileTableMapper;

    @Override
    public int addUrl(FileTable fileTable) {
        return fileTableMapper.addUrl(fileTable);
    }

    @Override
    public List<FileTable> getAllFileBySid(Integer sid) {
        return fileTableMapper.getAllBySid(sid);
    }

    @Override
    public List<FileTable> getAllFileByTid(Integer tid) {
        return fileTableMapper.getAllByTid(tid);
    }

    @Override
    public FileTable getInfoById(Integer id) {
        return fileTableMapper.getFileById(id);
    }

    @Override
    public void delFileById(Integer id) {
        fileTableMapper.delFileById(id);
    }
}
